package com.api.shopapi.mapper;


import com.api.shopapi.entity.EHealthInfo;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

@Repository
@Mapper
public interface EHealthInfoMapper {


    @Insert(" insert into  e_healthinfo " +
            "(" +
            "EHealthInfoCode, " +
            "UserCode, " +
            "Temperature, " +
            "Respiratory, " +
            "Stature, " +
            "Weight, " +
            "Constitution, " +
            "PulseRate, " +
            "BloodPressureLeft, " +
            "BloodPressureRight, " +
            "HipLine, " +
            "WaistLine, " +
            "Whr, " +
            "SelfCareAbility, " +
            "HealthStatus, " +
            "Symptom, " +
            "EmotionStates, " +
            "WorkingTime, " +
            "SymptomInfo, " +
            "OccupationalDiseasesType, " +
            "Dust, " +
            "DustSafeguard, " +
            "Radiogen, " +
            "RadiogenSafeguard, " +
            "Logistics, " +
            "LogisticsSafeguard, " +
            "Chemistry, " +
            "ChemistrySafeguard, " +
            "OccupationalDiseasesElse, " +
            "OccupationalDiseasesElseSafeguard, " +
            "Lip, " +
            "Tooth, " +
            "Pharynx, " +
            "LeftVision, " +
            "RightVision, " +
            "AdjustLeftVision, " +
            "AdjustRightVision, " +
            "Cognitive, " +
            "OccupationalDiseases, " +
            "Skin, " +
            "Sclera, " +
            "BarrelChest, " +
            "BreathSounds, " +
            "Rale, " +
            "HeartRate, " +
            "Noise, " +
            "PressPain, " +
            "Masses, " +
            "Splenauxe, " +
            "Hepatomegaly, " +
            "ShiftingDullness, " +
            "LegsEdema, " +
            "DorsalFoot, " +
            "Anus, " +
            "Breast, " +
            "Vulva, " +
            "Vagina, " +
            "Cervix, " +
            "Corpus, " +
            "Accessory, " +
            "Examine, " +
            "Athletic, " +
            "Hearing " +
            ") " +
            " values " +
            "(" +
            "#{eHealthInfo.EHealthInfoCode} ," +
            "#{eHealthInfo.UserCode} ," +
            "#{eHealthInfo.Temperature} ," +
            "#{eHealthInfo.Respiratory} ," +
            "#{eHealthInfo.Stature} ," +
            "#{eHealthInfo.Weight} ," +
            "#{eHealthInfo.Constitution} ," +
            "#{eHealthInfo.PulseRate} ," +
            "#{eHealthInfo.BloodPressureLeft} ," +
            "#{eHealthInfo.BloodPressureRight} ," +
            "#{eHealthInfo.HipLine} ," +
            "#{eHealthInfo.WaistLine} ," +
            "#{eHealthInfo.Whr} ," +
            "#{eHealthInfo.SelfCareAbility} ," +
            "#{eHealthInfo.HealthStatus} ," +
            "#{eHealthInfo.Symptom} ," +
            "#{eHealthInfo.EmotionStates} ," +
            "#{eHealthInfo.WorkingTime} ," +
            "#{eHealthInfo.SymptomInfo}, " +
            "#{eHealthInfo.OccupationalDiseasesType} , " +
            "#{eHealthInfo.Dust} , " +
            "#{eHealthInfo.DustSafeguard} , " +
            "#{eHealthInfo.Radiogen} , " +
            "#{eHealthInfo.RadiogenSafeguard} , " +
            "#{eHealthInfo.Logistics} , " +
            "#{eHealthInfo.LogisticsSafeguard} , " +
            "#{eHealthInfo.Chemistry} , " +
            "#{eHealthInfo.ChemistrySafeguard} , " +
            "#{eHealthInfo.OccupationalDiseasesElse} , " +
            "#{eHealthInfo.OccupationalDiseasesElseSafeguard} , " +
            "#{eHealthInfo.Lip} , " +
            "#{eHealthInfo.Tooth} , " +
            "#{eHealthInfo.Pharynx} , " +
            "#{eHealthInfo.LeftVision} , " +
            "#{eHealthInfo.RightVision} , " +
            "#{eHealthInfo.AdjustLeftVision} , " +
            "#{eHealthInfo.AdjustRightVision} , " +
            "#{eHealthInfo.Cognitive} , " +
            "#{eHealthInfo.OccupationalDiseases} , " +
            "#{eHealthInfo.Skin} , " +
            "#{eHealthInfo.Sclera} , " +
            "#{eHealthInfo.BarrelChest} , " +
            "#{eHealthInfo.BreathSounds} , " +
            "#{eHealthInfo.Rale} , " +
            "#{eHealthInfo.HeartRate} , " +
            "#{eHealthInfo.Noise} , " +
            "#{eHealthInfo.PressPain} , " +
            "#{eHealthInfo.Masses} , " +
            "#{eHealthInfo.Splenauxe} , " +
            "#{eHealthInfo.Hepatomegaly} , " +
            "#{eHealthInfo.ShiftingDullness} , " +
            "#{eHealthInfo.LegsEdema} , " +
            "#{eHealthInfo.DorsalFoot} , " +
            "#{eHealthInfo.Anus} , " +
            "#{eHealthInfo.Breast} , " +
            "#{eHealthInfo.Vulva} , " +
            "#{eHealthInfo.Vagina}, " +
            "#{eHealthInfo.Cervix}  , " +
            "#{eHealthInfo.Corpus} , " +
            "#{eHealthInfo.Accessory} ," +
            "#{eHealthInfo.Examine} ," +
            "#{eHealthInfo.Athletic} , " +
            "#{eHealthInfo.Hearing} " +
            ") ")
    int insert(@Param("eHealthInfo") EHealthInfo eHealthInfo);




    @Update("update e_healthinfo " +
            "set " +
            "Temperature=#{eHealthInfo.Temperature} ," +
            "Respiratory=#{eHealthInfo.Respiratory} ," +
            "Stature=#{eHealthInfo.Stature} ," +
            "Weight=#{eHealthInfo.Weight} ," +
            "Constitution=#{eHealthInfo.Constitution} ," +
            "PulseRate=#{eHealthInfo.PulseRate} ," +
            "BloodPressureLeft=#{eHealthInfo.BloodPressureLeft} ," +
            "BloodPressureRight=#{eHealthInfo.BloodPressureRight} ," +
            "HipLine=#{eHealthInfo.HipLine} ," +
            "WaistLine=#{eHealthInfo.WaistLine} ," +
            "Whr=#{eHealthInfo.Whr} ," +
            "SelfCareAbility=#{eHealthInfo.SelfCareAbility} ," +
            "HealthStatus=#{eHealthInfo.HealthStatus} ," +
            "Symptom=#{eHealthInfo.Symptom} ," +
            "EmotionStates=#{eHealthInfo.EmotionStates} ," +
            "WorkingTime=#{eHealthInfo.WorkingTime} ," +
            "SymptomInfo=#{eHealthInfo.SymptomInfo} ," +
            "OccupationalDiseasesType=#{eHealthInfo.OccupationalDiseasesType} ," +
            "Dust=#{eHealthInfo.Dust} ," +
            "DustSafeguard=#{eHealthInfo.DustSafeguard} ," +
            "Radiogen=#{eHealthInfo.Radiogen} ," +
            "RadiogenSafeguard=#{eHealthInfo.RadiogenSafeguard} ," +
            "Logistics=#{eHealthInfo.Logistics} ," +
            "LogisticsSafeguard=#{eHealthInfo.LogisticsSafeguard} ," +
            "Chemistry=#{eHealthInfo.Chemistry} ," +
            "ChemistrySafeguard=#{eHealthInfo.ChemistrySafeguard} ," +
            "OccupationalDiseasesElse=#{eHealthInfo.OccupationalDiseasesElse} ," +
            "OccupationalDiseasesElseSafeguard=#{eHealthInfo.OccupationalDiseasesElseSafeguard} ," +
            "Lip=#{eHealthInfo.Lip} ," +
            "Tooth=#{eHealthInfo.Tooth} ," +
            "Pharynx=#{eHealthInfo.Pharynx} ," +
            "LeftVision=#{eHealthInfo.LeftVision} ," +
            "RightVision=#{eHealthInfo.RightVision} ," +
            "AdjustLeftVision=#{eHealthInfo.AdjustLeftVision} ," +
            "AdjustRightVision=#{eHealthInfo.AdjustRightVision} ," +
            "Cognitive=#{eHealthInfo.Cognitive} ," +
            "OccupationalDiseases=#{eHealthInfo.OccupationalDiseases} ," +
            "Skin=#{eHealthInfo.Skin} ," +
            "Sclera=#{eHealthInfo.Sclera} ," +
            "BarrelChest=#{eHealthInfo.BarrelChest} ," +
            "BreathSounds=#{eHealthInfo.BreathSounds} ," +
            "Rale=#{eHealthInfo.Rale} ," +
            "HeartRate=#{eHealthInfo.HeartRate} ," +
            "Noise=#{eHealthInfo.Noise} ," +
            "PressPain=#{eHealthInfo.PressPain} ," +
            "Masses=#{eHealthInfo.Masses} ," +
            "Splenauxe=#{eHealthInfo.Splenauxe} ," +
            "Hepatomegaly=#{eHealthInfo.Hepatomegaly} ," +
            "ShiftingDullness=#{eHealthInfo.ShiftingDullness} ," +
            "LegsEdema=#{eHealthInfo.LegsEdema} ," +
            "DorsalFoot=#{eHealthInfo.DorsalFoot} ," +
            "Anus=#{eHealthInfo.Anus} ," +
            "Breast=#{eHealthInfo.Breast} ," +
            "Vulva=#{eHealthInfo.Vulva} ," +
            "Vagina=#{eHealthInfo.Vagina} ," +
            "Cervix=#{eHealthInfo.Cervix} ," +
            "Corpus=#{eHealthInfo.Corpus} ," +
            "Accessory=#{eHealthInfo.Accessory} ," +
            "Examine=#{eHealthInfo.Examine} ," +
            "Athletic=#{eHealthInfo.Athletic} ," +
            "Hearing=#{eHealthInfo.Hearing}  " +
            "where EHealthInfoCode=#{eHealthInfo.EHealthInfoCode}   ")
    int update(@Param("eHealthInfo") EHealthInfo eHealthInfo);

    @Select("select * from e_healthinfo where EHealthInfoCode=#{eHealthInfoCode} limit 1 ")
    EHealthInfo getByEHealthInfoCode(@Param("eHealthInfoCode") String eHealthInfoCode);

    @Select("select * from e_healthinfo where UserCode=#{userCode} limit 1 ")
    EHealthInfo getByUserCode(@Param("userCode") String userCode);









}
